<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta http-equiv="pragma" content="no-cach" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />

<title>无标题文档</title>
<style>
body{margin:0px;  }
li{list-style-type:hiragana;}
@font-face {
				font-family: 'inconsolata';
				src: url('../inc/inconsolata.woff') format('woff');
				font-weight: normal;
				font-style: normal;
			}

</style>
<script src="../inc/tools.build.js" type="text/javascript"></script>
<script src="../o/jquery-2.1.1.js"></script>
<script src="./webglJS/main.js?a=<?php echo rand(0,999999);?>"></script>
<script>
 
</script>
 

<?php
/*fileName: 
 *internal version: 0001
 *version : 1.0.0 [programming] [official version]
 *author : HeShengyu
 *Date : 2014.07.21 
 *email: koolfer@163.com
 *end date:2014.08.23
 *http://www.cnblogs.com/ssnowy/
*/
?>

</head>
<body>
<?php
 
require_once 'appInc.php';
function sgbk2utf($string) {
	if(is_array($string)) {
		foreach($string as $key => $val) {
			 $string[$key] = sgbk2utf($val);		 
		}
	} else {
	$string =iconv('GBK//IGNORE','UTF-8//IGNORE',$string);;
	}
	return $string;
}
$scan = new Clscandir('I:/VDownload/');
$files=$scan->getFiles_match('/.flv$/');
$tab = new Cltable;
$tab->export(  sgbk2utf($files)   );
$path =$scan->path ;
 
//_exec($files,$path);

function _exec($arr,$path){
    foreach($arr as $v){
		$cmdstr1='ffmpeg.exe -an -vcodec copy -i '.$path.$v.'   flv/'.preg_replace("/\.flv/","",$v).'.mp4';
		$cmdstr2='ffmpeg.exe -vn -acodec copy -i '.$path.$v.'   flv/'.preg_replace("/\.flv/","",$v).'.aac';
		
		$cmdstr3='mp4box.exe -add  flv/'.preg_replace("/\.flv/","",$v).'.mp4    -add   flv/'
		.preg_replace("/\.flv/","",$v).'.aac  -new flv/Flv2Mp4_'.preg_replace("/\.flv/","",$v).'.mp4';
		echo sgbk2utf($cmdstr1)."<br>";
		exec(  ($cmdstr1) ,$r1,$outcome1);
		secho($r1);
		echo $outcome1 ? 'ok<br>' : 'failed<br>';
		
		echo sgbk2utf($cmdstr2)."<br>";
		exec(  ($cmdstr2) ,$r2,$outcome2);
		secho($r1);
		echo $outcome2 ? 'ok<br>' : 'failed<br>';
		
		
		echo sgbk2utf($cmdstr3)."<br>";
		exec(  ($cmdstr3) ,$r3,$outcome3);
		secho($r1);
		echo $outcome3 ? 'ok<br>' : 'failed<br>';
				
	}	
}
/*exec('___FLV__ExtractVid.bat',$r,$b);
secho(sgbk2utf($r));

exec('___FLV_ExtractAudio.bat',$r2,$b);
secho(sgbk2utf($r2));

//exec('___FLV___MixMp4.bat',$r3,$b);
//secho(sgbk2utf($r3));

 exec('mp4box.exe -add flv/video.mp4     -add  flv/audio.aac      -new flv/Flv2Mp4_outMIX-.mp4',$r3,$b);
 secho(sgbk2utf($r3));*/
 
?> 
<div id="id1"></div>
</body>
</html>